package com.spzx.channel.controller;

import com.spzx.channel.service.IndexService;
import com.spzx.common.core.web.controller.BaseController;
import com.spzx.common.core.web.domain.AjaxResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName Index
 * @Author 波
 * @Date 2024/8/4 11:21
 */
@Slf4j
@RestController
@RequestMapping("/index")
@Tag(name = "首页管理")
public class Index extends BaseController {

    @Autowired
    private IndexService indexService;

    @Operation(summary = "获取首页数据")
    @GetMapping
    public AjaxResult getIndexData(){
        return success(indexService.getIndexData());
    }
}
